﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LittleBee.EngUnit
{
	public partial class EUValue
	{
		#region operator -
		public static EUValue operator -(EUValue v1, byte v2)
		{
			v1.Value -= v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, sbyte v2)
		{
			v1.Value -= v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, short v2)
		{
			v1.Value -= v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, ushort v2)
		{
			v1.Value -= v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, int v2)
		{
			v1.Value -= v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, uint v2)
		{
			v1.Value -= v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, Int64 v2)
		{
			v1.Value -= v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, UInt64 v2)
		{
			v1.Value -= v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, float v2)
		{
			v1.Value -= v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, double v2)
		{
			v1.Value -= (float)v2;

			return v1;
		}
		public static EUValue operator -(EUValue v1, EUValue v2)
		{
			v1.Value -= EU.Convert(v2.Value, v2._eu, v1._eu);

			return v1;
		}
		#endregion operator -
	}
}
